<?php


require_once( "_inc.php" );
util::auth( );
$userId = !empty( $_GET['id'] ) ? trim( $_GET['id'] ) : "";
$backUrl = !empty( $_GET['back'] ) ? trim( $_GET['back'] ) : base64_encode( "user_list.php" );
if ( empty( $userId ) )
{
	$tpl->assign( "msg", "缺少参数" );
	$tpl->display( "_msg.tpl" );
	exit( );
}
$sql = "DELETE FROM ".$gDb['prefix'].( "usersites WHERE (f_userId='".$userId."')" );
$db->query( $sql );
$sql = "DELETE FROM ".$gDb['prefix'].( "users WHERE (f_id='".$userId."')" );
$db->query( $sql );
header( "location: ".base64_decode( $backUrl ) );
?>
